*********************************************
**** Replication Data - Leaving a Legacy ****
************* Analysis File *****************
****** Joshua P. Darr & Moriah Harman *******
*********************************************



cd "~/ISCAP Data"

use "iscap_678_tv_wide.dta", clear

*keep if _merge==3


reshape long state__ pid7__ pid_folded__ rep_dum_2p__ news_tvlocal__ news_tvnotlocal__ news_tv__ news_tvnone__ news_np__ np_national__ news_nplocalnone__ news_npnotlocal__ news_npnone__ news_tvnews__ news_notvnews__ news_tvbroadcast__ news_tvcable__ news_tvnotbroadcast__ news_tvnotcable__ entertainment__ news_tvnational__ news_tvnotnational__ news_internet__ news_nointernet__ pid3__ election_attention__ election_money__ election_faith__ election_index__ system_pref__ system_nochange__ system_best__ system_nocrit__ system_index__ aid_blacks__ divided__ disagreement__ polarized__ extreme__ polarization_index__ aca_repeal__ PPINCIMP__ PPGENDER__ PPEDUCAT__ PPSTATEN__ PPETHM__, i(MNO) j(wave)

xtset MNO wave



** Create labels **
label define news_tvnotlocal__ 0"Watches" 1"Does not watch"
label variable news_tvnotlocal__ "Stopped watching local TV news"
label values news_tvnotlocal__ news_tvnotlocal__

label define news_tvnone__ 0"Watches" 1"Does not watch"
label variable news_tvnone__ "Stopped watching TV"
label values news_tvnone__ news_tvnotlocal__

label define news_notvnews__ 0"Watches" 1"Does not watch"
label variable news_notvnews__ "Stopped watching any TV news"
label values news_notvnews__ news_notvnews__

label define news_tvnotnational__ 0"Watches" 1"Does not watch"
label variable news_tvnotnational__ "Stopped watching national TV news"
label values news_tvnotnational__ news_tvnotnational__

label define news_tvnotbroadcast__ 0"Watches" 1"Does not watch"
label variable news_tvnotbroadcast__ "Stopped watching national broadcast TV news"
label values news_tvnotbroadcast__ news_tvnotbroadcast__

label define news_tvnotcable__ 0"Watches" 1"Does not watch"
label variable news_tvnotcable__ "Stopped watching cable TV news"
label values news_tvnotcable__ news_tvnotcable__

label define news_npnone__ 0"Reads" 1"Does not read"
label variable news_npnone__ "Stopped reading newspaper"
label values news_npnone__ news_npnone__

label define news_nplocalnone__ 0"Reads" 1"Does not read"
label variable news_nplocalnone__ "Stopped reading local newspaper"
label values news_nplocalnone__ news_nplocalnone__

label define news_internet__ 0"Does not use" 1"Uses"
label variable news_internet__ "Started using internet for news"
label values news_internet__ news_internet__

label define news_nointernet__ 0"Uses" 1"Does not use"
label variable news_nointernet__ "Stopped using internet for news"
label values news_nointernet__ news_internet__


label define rep_dum_2p__ 0"Democrat" 1"Republican"
label variable rep_dum_2p__ "Party ID (two-party)"
label values rep_dum_2p__ rep_dum_2p__



save "iscap_678_tv_long.dta", replace



*** ANALYSES AND APPENDICES **
cd "~/ISCAP Data"

use "iscap_678_tv_long.dta", clear

replace system_pref__ = system_pref__/4
replace system_nochange__ = system_nochange__/4
replace system_best__ = system_best__/4
replace system_nocrit__ = system_nocrit__/4

replace election_faith__ = election_faith__/4
replace election_attention__ = election_attention__/2
replace election_money__ = election_money__/2


** Descriptive figures **
graph bar system_pref__ system_nochange__ system_best__ system_nocrit__ system_index__, scheme(s2mono) /*
	*/legend(order(1 "Prefers system" 2 "No change to system" 3 "System is best" 4 "No criticisms" 5 "Index") cols(1)) title("Political system attitudes (0-1)")
	
graph save "Figures/Revised/R4/System_descriptives.gph", replace


graph bar election_attention__ election_money__ election_faith__ election_index__, scheme(s2mono) /*
	*/legend(order(1 "Make gov't pay attention'" 2 "Best candidate wins" 3 "Faith that elections are fair") cols(1)) title("Electoral legitimacy attitudes (0-1)")

graph save "Figures/Revised/R4/Election_descriptives.gph", replace

graph combine "Figures/Revised/R4/Election_descriptives.gph" "Figures/Revised/R4/System_descriptives.gph", rows(2) ysize(8) xsize(4)
graph save "Figures/Revised/A1_descriptives.gph", replace
graph export "Figures/Revised/A1_descriptives.pdf", replace


* XTSET *
xtset MNO wave

* Hausman test *
xtreg election_faith__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, fe
ereturn list
estimates store fixed

xtreg election_faith__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, re
ereturn list
estimates store random

hausman fixed random, sigmamore


*** FIXED EFFECTS ANALYSES ***

cd "~/ISCAP Data"

use "iscap_678_tv_long.dta", clear

replace election_faith__ = election_faith__/4
replace election_attention__ = election_attention__/2
replace election_money__ = election_money__/2

replace system_pref__ = system_pref__/4
replace system_nochange__ = system_nochange__/4
replace system_best__ = system_best__/4
replace system_nocrit__ = system_nocrit__/4



** Descriptive figures **
graph bar election_attention__ election_money__ election_faith__ election_index__, scheme(s2mono) /*
	*/legend(order(1 "Make gov't pay attention'" 2 "Best candidate wins" 3 "Faith that elections are fair" 4 "Index") cols(1)) title("Electoral legitimacy attitudes (0-1)")

graph save "Figures/Revised/R4/Election_descriptives.gph", replace

graph bar system_pref__ system_nochange__ system_best__ system_nocrit__ system_index__, scheme(s2mono) /*
	*/legend(order(1 "Prefers system" 2 "No change to system" 3 "System is best" 4 "No criticisms" 5 "Index") cols(1)) title("Political system attitudes (0-1)")
	
graph save "Figures/Revised/R4/System_descriptives.gph", replace


graph combine "Figures/Revised/R4/Election_descriptives.gph" "Figures/Revised/R4/System_descriptives.gph", rows(1) ysize(4) xsize(8)
graph save "Figures/Revised/A1_descriptives.gph", replace
graph export "Figures/Revised/A1_descriptives.pdf", replace



* XTSET *
xtset MNO wave



** Elections **
** No TV news **

xtreg election_faith__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_faith
outreg2 using "Tables/FE/Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)

xtreg election_attention__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_attention
outreg2 using "Tables/FE/Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)

xtreg election_money__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_money
outreg2 using "Tables/FE/Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)

xtreg election_index__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_index
outreg2 using "Tables/FE/Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)


** Coefficient plot of results **
coefplot (elect_faith, label("Faith that elections are fair")) (elect_attention, label("Elections make gov't pay attention")) (elect_money, label("Best candidate wins, not most $$")) (elect_index, label("Index of above attitudes")), keep(news_nplocalnone__ news_notvnews__ news_nointernet__ wave) xline(0) legend(cols(1) title("{bf:Opinions about elections in the U.S.}", size(small)) position(12) region(lcolor(white)) size(vsmall)) title("{bf:Model 1a: Any TV news}", size(medium)) scheme(s2mono) xscale(range(-0.1 0.1)) xlabel(-0.1(0.05)0.1) coeflabels(, wrap(9) ) ysize(8) xsize(5.5) graphregion(color(white))

graph save "Figures/FE/Elections_medium.gph", replace


** No national & no local **

xtreg election_faith__ news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_faith
outreg2 using "Tables/FE/elections_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)

xtreg election_attention__ news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_attention
outreg2 using "Tables/FE/elections_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)
xtreg election_money__ news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_money
outreg2 using "Tables/FE/elections_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)

xtreg election_index__ news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_index
outreg2 using "Tables/FE/elections_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)

** Coefficient plot of results **
coefplot (elect_faith, label("Faith that elections are fair")) (elect_attention, label("Elections make gov't pay attention")) (elect_money, label("Best candidate wins, not most $$")) (elect_index, label("Index of above attitudes")), keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ wave) xline(0) legend(cols(1) title("{bf:Opinions about elections in the U.S.}", size(medsmall)) position(12) region(lcolor(white)) size(medsmall)) scheme(s2mono) xscale(range(-0.1 0.1)) xlabel(-0.1(0.05)0.1) coeflabels(, wrap(9)) ysize(8) xsize(5.5) graphregion(color(white))

graph save "Figures/FE/Elections_LN.gph", replace


** Broadcast, cable, local **

xtreg election_faith__ news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_faith
outreg2 using "Tables/FE/Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)

xtreg election_attention__ news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_attention
outreg2 using "Tables/FE/Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)

xtreg election_money__ news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_money
outreg2 using "Tables/FE/Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)

xtreg election_index__ news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_index
outreg2 using "Tables/FE/Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)


** Coefficient plot of results **
coefplot (elect_faith, label("Faith that elections are fair")) (elect_attention, label("Elections make gov't pay attention")) (elect_money, label("Best candidate wins, not most $$")) (elect_index, label("Index of above attitudes")), keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ wave) xline(0) legend(cols(1) title("{bf:Opinions about elections in the U.S.}", size(medsmall)) position(12) region(lcolor(white)) size(medsmall)) title("{bf:Model 1b: Local, broadcast, cable}", size(medium)) scheme(s2mono) xscale(range(-0.1 0.1)) xlabel(-0.1(0.05)0.1) coeflabels(, wrap(9)) ysize(8) xsize(5.5) graphregion(color(white))

graph save "Figures/FE/Elections_tvsplit.gph", replace

graph combine "Figures/FE/Elections_medium.gph" "Figures/FE/Elections_LN.gph" "Figures/FE/Elections_tvsplit.gph", rows(3) xsize(3.5) ysize(9) graphregion(color(white))

graph save "Figures/FE/Elections_models.gph", replace
graph export "Figures/FE/Elections_models.pdf", replace


grc1leg "Figures/FE/Elections_medium.gph" "Figures/FE/Elections_tvsplit.gph", cols(2) graphregion(color(white)) legendfrom("Figures/FE/Elections_medium.gph") position(12) ysize(12) iscale(0.6)

graph save "Figures/FE/F1_Elections_models.gph", replace
graph export "Figures/FE/F1_Elections_models.pdf", replace








**** System ****

** Medium only **

xtreg system_pref__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store media_pref
outreg2 using "Tables/FE/Table2_system_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)

xtreg system_nochange__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store media_change
outreg2 using "Tables/FE/Table2_system_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)

xtreg system_best__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store media_best
outreg2 using "Tables/FE/Table2_system_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)

xtreg system_nocrit__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store media_crit
outreg2 using "Tables/FE/Table2_system_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)

xtreg system_index__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store media_index
outreg2 using "Tables/FE/Table2_system_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)


** Coefficient plot of results **
coefplot (media_pref, label("Prefers to any other")) (media_change, label("Does not need changes")) (media_best, label("Is best for representation")) (media_crit, label("Not critical of")) (media_index, label("Index of above attitudes")), keep(news_nplocalnone__ news_notvnews__ news_nointernet__ wave) xline(0) legend(cols(1) title("{bf:Opinions about US system of government}", size(small)) position(12) region(lcolor(white)) size(vsmall)) scheme(s2mono) xscale(range(-0.1 0.1)) xlabel(-0.1(0.05)0.1) coeflabels(, wrap(9)) ysize(8) xsize(5.5) graphregion(color(white))

graph save "Figures/FE/System_medium.gph", replace




** TV local & national **

xtreg system_pref__ news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store media_pref
outreg2 using "Tables/FE/systems_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)

xtreg system_nochange__ news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store media_change
outreg2 using "Tables/FE/systems_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)

xtreg system_best__ news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store media_best
outreg2 using "Tables/FE/systems_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)

xtreg system_nocrit__ news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store media_crit
outreg2 using "Tables/FE/systems_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)

xtreg system_index__ news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store media_index
outreg2 using "Tables/FE/systems_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)


** Coefficient plot of results **
coefplot (media_pref, label("Prefers to any other")) (media_change, label("Does not need changes")) (media_best, label("Is best for representation")) (media_crit, label("Not critical of")) (media_index, label("Index of above attitudes")), keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ wave) xline(0) legend(cols(1) title("{bf:Opinions about US system of gov't}", size(medsmall)) position(12) region(lcolor(white)) size(medsmall)) scheme(s2mono) xscale(range(-0.1 0.1)) xlabel(-0.1(0.05)0.1) coeflabels(, wrap(9)) ysize(8) xsize(5.5) graphregion(color(white))

graph save "Figures/FE/System_LN.gph", replace



* TV local, broadcast & cable *

xtreg system_pref__ news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store media_pref
outreg2 using "Tables/FE/Table2_system_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)

xtreg system_nochange__ news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store media_change
outreg2 using "Tables/FE/Table2_system_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)

xtreg system_best__ news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store media_best
outreg2 using "Tables/FE/Table2_system_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)

xtreg system_nocrit__ news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store media_crit
outreg2 using "Tables/FE/Table2_system_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)

xtreg system_index__ news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store media_index
outreg2 using "Tables/FE/Table2_system_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)


** Coefficient plot of results **
coefplot (media_pref, label("Prefers to any other")) (media_change, label("Does not need changes")) (media_best, label("Is best for representation")) (media_crit, label("Not critical of")) (media_index, label("Index of above attitudes")), keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ wave) xline(0) legend(cols(1) title("{bf:Opinions about US system of government}", size(medsmall)) position(12) region(lcolor(white)) size(medsmall)) scheme(s2mono) xscale(range(-0.1 0.1)) xlabel(-0.1(0.05)0.1) coeflabels(, wrap(9)) ysize(8) xsize(5.5) graphregion(color(white))

graph save "Figures/FE/System_tvsplit.gph", replace


graph combine "Figures/FE/System_medium.gph" "Figures/FE/System_tvsplit.gph", rows(2) xsize(3.5) ysize(11) graphregion(color(white))

graph save "Figures/FE/System_models.gph", replace
graph export "Figures/FE/System_models.pdf", replace


grc1leg "Figures/FE/System_medium.gph" "Figures/FE/System_tvsplit.gph", cols(2) graphregion(color(white)) legendfrom("Figures/FE/System_medium.gph") position(12) ysize(12) iscale(0.6)

graph save "Figure 2 - System attitudes.gph", replace
graph export "Figure 2 - System attitudes.pdf", replace



** Combined coefficient plot **

graph combine "Figures/FE/F1_Elections_models.gph" "Figure 2 - System attitudes.gph", cols(1) ysize(10) xsize(6) graphregion(color(white))

graph save "Figures/FE/Combined figure - Elections & System attitudes.gph", replace
graph export "Figures/FE/Combined figure - Elections & System attitudes.pdf", replace












*** APPENDICES ***


** Mixed effects models **

cd "~/ISCAP Data"

use "iscap_678_tv_long.dta", clear

replace election_faith__ = election_faith__/4
replace election_attention__ = election_attention__/2
replace election_money__ = election_money__/2

replace system_pref__ = system_pref__/4
replace system_nochange__ = system_nochange__/4
replace system_best__ = system_best__/4
replace system_nocrit__ = system_nocrit__/4

* XTSET *
xtset MNO wave

** Elections **
** No TV news **

xtreg election_faith__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store elect_faith
outreg2 using "Tables/ME/Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)

xtreg election_attention__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store elect_attention
outreg2 using "Tables/ME/Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)

xtreg election_money__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store elect_money
outreg2 using "Tables/ME/Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)

xtreg election_index__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store elect_index
outreg2 using "Tables/ME/Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)


** Coefficient plot of results **
coefplot (elect_faith, label("Faith that elections are fair")) (elect_attention, label("Elections make gov't pay attention")) (elect_money, label("Best candidate wins, not most $$")) (elect_index, label("Index of above attitudes")), keep(news_nplocalnone__ news_notvnews__ news_nointernet__ wave) xline(0) legend(cols(1) title("{bf:Opinions about elections in the U.S.}", size(small)) position(12) region(lcolor(white)) size(vsmall)) title("{bf:Model 1a: Any TV news}", size(medium)) scheme(s2mono) xscale(range(-0.1 0.1)) xlabel(-0.1(0.05)0.1) coeflabels(, wrap(9) ) ysize(8) xsize(5.5) graphregion(color(white))

graph save "Figures/ME/Elections_medium.gph", replace


** No national & no local **

xtreg election_faith__ news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store elect_faith
outreg2 using "Tables/ME/elections_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)

xtreg election_attention__ news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store elect_attention
outreg2 using "Tables/ME/elections_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)
xtreg election_money__ news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store elect_money
outreg2 using "Tables/ME/elections_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)

xtreg election_index__ news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store elect_index
outreg2 using "Tables/ME/elections_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)

** Coefficient plot of results **
coefplot (elect_faith, label("Faith that elections are fair")) (elect_attention, label("Elections make gov't pay attention")) (elect_money, label("Best candidate wins, not most $$")) (elect_index, label("Index of above attitudes")), keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ wave) xline(0) legend(cols(1) title("{bf:Opinions about elections in the U.S.}", size(medsmall)) position(12) region(lcolor(white)) size(medsmall)) scheme(s2mono) xscale(range(-0.1 0.1)) xlabel(-0.1(0.05)0.1) coeflabels(, wrap(9)) ysize(8) xsize(5.5) graphregion(color(white))

graph save "Figures/ME/Elections_LN.gph", replace


** Broadcast, cable, local **

xtreg election_faith__ news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store elect_faith
outreg2 using "Tables/ME/Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)

xtreg election_attention__ news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store elect_attention
outreg2 using "Tables/ME/Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)

xtreg election_money__ news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store elect_money
outreg2 using "Tables/ME/Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)

xtreg election_index__ news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store elect_index
outreg2 using "Tables/ME/Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)


** Coefficient plot of results **
coefplot (elect_faith, label("Faith that elections are fair")) (elect_attention, label("Elections make gov't pay attention")) (elect_money, label("Best candidate wins, not most $$")) (elect_index, label("Index of above attitudes")), keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ wave) xline(0) legend(cols(1) title("{bf:Opinions about elections in the U.S.}", size(medsmall)) position(12) region(lcolor(white)) size(medsmall)) title("{bf:Model 1b: Local, broadcast, cable}", size(medium)) scheme(s2mono) xscale(range(-0.1 0.1)) xlabel(-0.1(0.05)0.1) coeflabels(, wrap(9)) ysize(8) xsize(5.5) graphregion(color(white))

graph save "Figures/ME/Elections_tvsplit.gph", replace

graph combine "Figures/ME/Elections_medium.gph" "Figures/ME/Elections_LN.gph" "Figures/ME/Elections_tvsplit.gph", rows(3) xsize(3.5) ysize(9) graphregion(color(white))

graph save "Figures/ME/Elections_models.gph", replace
graph export "Figures/ME/Elections_models.pdf", replace


grc1leg "Figures/ME/Elections_medium.gph" "Figures/ME/Elections_tvsplit.gph", cols(2) graphregion(color(white)) legendfrom("Figures/ME/Elections_medium.gph") position(12) ysize(12) iscale(0.6)

graph save "Figures/ME/F1_Elections_models.gph", replace
graph export "Figures/ME/F1_Elections_models.pdf", replace




**** System ****

** Medium only **

xtreg system_pref__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store media_pref
outreg2 using "Tables/ME/Table2_system_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)

xtreg system_nochange__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store media_change
outreg2 using "Tables/ME/Table2_system_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)

xtreg system_best__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store media_best
outreg2 using "Tables/ME/Table2_system_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)

xtreg system_nocrit__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store media_crit
outreg2 using "Tables/ME/Table2_system_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)

xtreg system_index__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store media_index
outreg2 using "Tables/ME/Table2_system_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)


** Coefficient plot of results **
coefplot (media_pref, label("Prefers to any other")) (media_change, label("Does not need changes")) (media_best, label("Is best for representation")) (media_crit, label("Not critical of")) (media_index, label("Index of above attitudes")), keep(news_nplocalnone__ news_notvnews__ news_nointernet__ wave) xline(0) legend(cols(1) title("{bf:Opinions about US system of government}", size(small)) position(12) region(lcolor(white)) size(vsmall)) scheme(s2mono) xscale(range(-0.1 0.1)) xlabel(-0.1(0.05)0.1) coeflabels(, wrap(9)) ysize(8) xsize(5.5) graphregion(color(white))

graph save "Figures/ME/System_medium.gph", replace




** TV local & national **

xtreg system_pref__ news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store media_pref
outreg2 using "Tables/ME/systems_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)

xtreg system_nochange__ news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store media_change
outreg2 using "Tables/ME/systems_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)

xtreg system_best__ news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store media_best
outreg2 using "Tables/ME/systems_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)

xtreg system_nocrit__ news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store media_crit
outreg2 using "Tables/ME/systems_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)

xtreg system_index__ news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store media_index
outreg2 using "Tables/ME/systems_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)


** Coefficient plot of results **
coefplot (media_pref, label("Prefers to any other")) (media_change, label("Does not need changes")) (media_best, label("Is best for representation")) (media_crit, label("Not critical of")) (media_index, label("Index of above attitudes")), keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ wave) xline(0) legend(cols(1) title("{bf:Opinions about US system of gov't}", size(medsmall)) position(12) region(lcolor(white)) size(medsmall)) scheme(s2mono) xscale(range(-0.1 0.1)) xlabel(-0.1(0.05)0.1) coeflabels(, wrap(9)) ysize(8) xsize(5.5) graphregion(color(white))

graph save "Figures/ME/System_LN.gph", replace



* TV local, broadcast & cable *

xtreg system_pref__ news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store media_pref
outreg2 using "Tables/ME/Table2_system_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)

xtreg system_nochange__ news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store media_change
outreg2 using "Tables/ME/Table2_system_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)

xtreg system_best__ news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store media_best
outreg2 using "Tables/ME/Table2_system_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)

xtreg system_nocrit__ news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store media_crit
outreg2 using "Tables/ME/Table2_system_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)

xtreg system_index__ news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, re
est store media_index
outreg2 using "Tables/ME/Table2_system_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)


** Coefficient plot of results **
coefplot (media_pref, label("Prefers to any other")) (media_change, label("Does not need changes")) (media_best, label("Is best for representation")) (media_crit, label("Not critical of")) (media_index, label("Index of above attitudes")), keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ wave) xline(0) legend(cols(1) title("{bf:Opinions about US system of government}", size(medsmall)) position(12) region(lcolor(white)) size(medsmall)) scheme(s2mono) xscale(range(-0.1 0.1)) xlabel(-0.1(0.05)0.1) coeflabels(, wrap(9)) ysize(8) xsize(5.5) graphregion(color(white))

graph save "Figures/ME/System_tvsplit.gph", replace


graph combine "Figures/ME/System_medium.gph" "Figures/ME/System_tvsplit.gph", rows(2) xsize(3.5) ysize(11) graphregion(color(white))

graph save "Figures/ME/System_models.gph", replace
graph export "Figures/ME/System_models.pdf", replace


grc1leg "Figures/ME/System_medium.gph" "Figures/ME/System_tvsplit.gph", cols(2) graphregion(color(white)) legendfrom("Figures/ME/System_medium.gph") position(12) ysize(12) iscale(0.6)








** Cross-lagged panel model **
use "iscap_678_tv_wide.dta", clear

* 1. Initial attempt
gsem (news_nplocalnone__6 -> election_faith__6, ) (news_tvnotlocal__6 -> election_faith__6, ) (news_tvnotbroadcast__6 -> election_faith__6, ) (news_nointernet__6 -> election_faith__6, ) (election_faith__6 -> news_nplocalnone__7, ) (election_faith__6 -> news_tvnotbroadcast__7, ) (election_faith__6 -> news_nointernet__7, ) (election_faith__6 -> news_tvnotcable__7, ) (news_nplocalnone__7 -> election_faith__7, ) (news_tvnotbroadcast__7 -> election_faith__7, ) (news_tvnotcable__6 -> election_faith__6, ) (news_nointernet__7 -> election_faith__7, ) (election_faith__7 -> news_nplocalnone__8, ) (election_faith__7 -> news_tvnotbroadcast__8, ) (election_faith__7 -> news_nointernet__8, ) (election_faith__7 -> news_tvnotlocal__8, ) (election_faith__7 -> news_tvnotcable__8, ) (news_nplocalnone__8 -> election_faith__8, ) (news_tvnotlocal__7 -> election_faith__7, ) (news_tvnotbroadcast__8 -> election_faith__8, ) (news_nointernet__8 -> election_faith__8, ) (news_tvnotcable__7 -> election_faith__7, ) (news_tvnotlocal__8 -> election_faith__8, ) (news_tvnotcable__8 -> election_faith__8, ), nolog difficult technique(bhhh) iterate(50) nocapslatent

* 2. Save results as starting point
matrix beta = e(b)

* 3. Final model
gsem (news_nplocalnone__6 -> election_faith__6, ) (news_tvnotlocal__6 -> election_faith__6, ) (news_tvnotbroadcast__6 -> election_faith__6, ) (news_nointernet__6 -> election_faith__6, ) (election_faith__6 -> news_nplocalnone__7, ) (election_faith__6 -> news_tvnotbroadcast__7, ) (election_faith__6 -> news_nointernet__7, ) (election_faith__6 -> news_tvnotcable__7, ) (news_nplocalnone__7 -> election_faith__7, ) (news_tvnotbroadcast__7 -> election_faith__7, ) (news_tvnotcable__6 -> election_faith__6, ) (news_nointernet__7 -> election_faith__7, ) (election_faith__7 -> news_nplocalnone__8, ) (election_faith__7 -> news_tvnotbroadcast__8, ) (election_faith__7 -> news_nointernet__8, ) (election_faith__7 -> news_tvnotlocal__8, ) (election_faith__7 -> news_tvnotcable__8, ) (news_nplocalnone__8 -> election_faith__8, ) (news_tvnotlocal__7 -> election_faith__7, ) (news_tvnotbroadcast__8 -> election_faith__8, ) (news_nointernet__8 -> election_faith__8, ) (news_tvnotcable__7 -> election_faith__7, ) (news_tvnotlocal__8 -> election_faith__8, ) (news_tvnotcable__8 -> election_faith__8, ), nolog difficult technique(bhhh) iterate(50) nocapslatent from(beta)

outreg2 using "Tables/FE/Appendix_SEM.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *)




** Waves 6 and 7 only, Elections Attitudes **
cd "~/ISCAP Data"

use "iscap_678_tv_long.dta", clear

replace system_pref__ = system_pref__/4
replace system_nochange__ = system_nochange__/4
replace system_best__ = system_best__/4
replace system_nocrit__ = system_nocrit__/4

replace election_faith__ = election_faith__/4
replace election_attention__ = election_attention__/2
replace election_money__ = election_money__/2


* XTSET *
xtset MNO wave

drop if wave==8

** Elections **
** No TV news **

xtreg election_faith__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_faith
outreg2 using "Tables/FE/w6_7_Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)

xtreg election_attention__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_attention
outreg2 using "Tables/FE/w6_7_Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)

xtreg election_money__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_money
outreg2 using "Tables/FE/w6_7_Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)

xtreg election_index__ news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_index
outreg2 using "Tables/FE/w6_7_Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)


** Coefficient plot of results **
coefplot (elect_faith, label("Faith that elections are fair")) (elect_attention, label("Elections make gov't pay attention")) (elect_money, label("Best candidate wins, not most $$")) (elect_index, label("Index of above attitudes")), keep(news_nplocalnone__ news_notvnews__ news_nointernet__ wave) xline(0) legend(cols(1) title("{bf:Opinions about elections in the U.S.}", size(small)) position(12) region(lcolor(white)) size(vsmall)) title("{bf:Model 1a: Any TV news}", size(medium)) scheme(s2mono) xscale(range(-0.1 0.1)) xlabel(-0.1(0.05)0.1) coeflabels(, wrap(9) ) ysize(8) xsize(5.5) graphregion(color(white))

graph save "Figures/FE/w6_7_Elections_medium.gph", replace


** No national & no local **

xtreg election_faith__ news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_faith
outreg2 using "Tables/FE/w6_7_elections_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)

xtreg election_attention__ news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_attention
outreg2 using "Tables/FE/w6_7_elections_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)
xtreg election_money__ news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_money
outreg2 using "Tables/FE/w6_7_elections_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)

xtreg election_index__ news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_index
outreg2 using "Tables/FE/w6_7_elections_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)

** Coefficient plot of results **
coefplot (elect_faith, label("Faith that elections are fair")) (elect_attention, label("Elections make gov't pay attention")) (elect_money, label("Best candidate wins, not most $$")) (elect_index, label("Index of above attitudes")), keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ wave) xline(0) legend(cols(1) title("{bf:Opinions about elections in the U.S.}", size(medsmall)) position(12) region(lcolor(white)) size(medsmall)) scheme(s2mono) xscale(range(-0.1 0.1)) xlabel(-0.1(0.05)0.1) coeflabels(, wrap(9)) ysize(8) xsize(5.5) graphregion(color(white))

graph save "Figures/FE/w6_7_Elections_LN.gph", replace


** Broadcast, cable, local **

xtreg election_faith__ news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_faith
outreg2 using "Tables/FE/w6_7_Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)

xtreg election_attention__ news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_attention
outreg2 using "Tables/FE/w6_7_Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)

xtreg election_money__ news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_money
outreg2 using "Tables/FE/w6_7_Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)

xtreg election_index__ news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_index
outreg2 using "Tables/FE/w6_7_Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)


** Coefficient plot of results **
coefplot (elect_faith, label("Faith that elections are fair")) (elect_attention, label("Elections make gov't pay attention")) (elect_money, label("Best candidate wins, not most $$")) (elect_index, label("Index of above attitudes")), keep(news_nplocalnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ wave) xline(0) legend(cols(1) title("{bf:Opinions about elections in the U.S.}", size(medsmall)) position(12) region(lcolor(white)) size(medsmall)) title("{bf:Model 1b: Local, broadcast, cable}", size(medium)) scheme(s2mono) xscale(range(-0.1 0.1)) xlabel(-0.1(0.05)0.1) coeflabels(, wrap(9)) ysize(8) xsize(5.5) graphregion(color(white))

graph save "Figures/FE/w6_7_Elections_tvsplit.gph", replace

graph combine "Figures/FE/w6_7_Elections_medium.gph" "Figures/FE/w6_7_Elections_LN.gph" "Figures/FE/w6_7_Elections_tvsplit.gph", rows(3) xsize(3.5) ysize(9) graphregion(color(white))

graph save "Figures/FE/w6_7_Elections_models.gph", replace
graph export "Figures/FE/w6_7_Elections_models.pdf", replace


grc1leg "Figures/FE/w6_7_Elections_medium.gph" "Figures/FE/w6_7_Elections_tvsplit.gph", cols(2) graphregion(color(white)) legendfrom("Figures/FE/w6_7_Elections_medium.gph") position(12) ysize(12) iscale(0.6)

graph save "Figures/FE/w6_7_F1_Elections_models.gph", replace
graph export "Figures/FE/w6_7_F1_Elections_models.pdf", replace






** Elections: Interactions (newspaper vs internet) **
cd "~/ISCAP Data"

use "iscap_678_tv_long.dta", clear

replace election_faith__ = election_faith__/4
replace election_attention__ = election_attention__/2
replace election_money__ = election_money__/2

replace system_pref__ = system_pref__/4
replace system_nochange__ = system_nochange__/4
replace system_best__ = system_best__/4
replace system_nocrit__ = system_nocrit__/4

* XTSET *
xtset MNO wave


xtreg election_faith__ news_nplocalnone__##news_nointernet__ news_notvnews__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
outreg2 using "Tables/FE/Table2_interactions.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(1.news_nplocalnone__ 1.news_nointernet__ 1.news_nplocalnone__#1.news_nointernet  news_notvnews__  b2.pid3 i.wave)
margins, at(news_nplocalnone__=(0 1) news_nointernet__==(0 1)) vsquish
marginsplot, xscale(range(-0.2 1.2)) yscale(range(0.3 0.7)) ylabel(0.3(0.1)0.7) title("Faith that elections are fair") /*
	*/ ytitle("") xtitle("Newspaper") legend(title("Internet", size(medsmall) pos(6)))/*
	*/ plot1opts(lpattern(#-#) lcolor(black) mcolor(black)) plot2opts(lpattern(-) lcolor(gray) mcolor(gray)) scheme(s2mono)
margins, at(news_nplocalnone__=(0 1) news_nointernet__==(0 1)) vsquish pwcompare
* stop internet = -* if also stop np
	
graph save "Figures/FE/NP_IN_Elections_faith.gph", replace
*graph export "Figures/FE/NP_IN_Elections_faith.pdf", replace

xtreg election_attention__ news_nplocalnone__##news_nointernet__ news_notvnews__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
outreg2 using "Tables/FE/Table2_interactions.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(1.news_nplocalnone__ 1.news_nointernet__ 1.news_nplocalnone__#1.news_nointernet  news_notvnews__  b2.pid3 i.wave)
margins, at(news_nplocalnone__=(0 1) news_nointernet__==(0 1)) vsquish
marginsplot, xscale(range(-0.2 1.2)) yscale(range(0.3 0.7)) ylabel(0.3(0.1)0.7) title("Elections make gov't pay attention") /*
	*/ ytitle("") xtitle("Newspaper") legend(title("Internet", size(medsmall) pos(6)))/*
	*/ plot1opts(lpattern(#-#) lcolor(black) mcolor(black)) plot2opts(lpattern(-) lcolor(gray) mcolor(gray)) scheme(s2mono)
margins, at(news_nplocalnone__=(0 1) news_nointernet__==(0 1)) vsquish pwcompare
*none

graph save "Figures/FE/NP_IN_Elections_attention.gph", replace
*graph export "Figures/FE/NP_IN_Elections_attention.pdf", replace

xtreg election_money__ news_nplocalnone__##news_nointernet__ news_notvnews__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
outreg2 using "Tables/FE/Table2_interactions.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(1.news_nplocalnone__ 1.news_nointernet__ 1.news_nplocalnone__#1.news_nointernet  news_notvnews__  b2.pid3 i.wave)
margins, at(news_nplocalnone__=(0 1) news_nointernet__==(0 1)) vsquish
marginsplot, xscale(range(-0.2 1.2)) yscale(range(0.3 0.7)) ylabel(0.3(0.1)0.7) title("Best candidate wins, not most $$") /*
	*/ ytitle("") xtitle("Newspaper") legend(title("Internet", size(medsmall) pos(6)))/*
	*/ plot1opts(lpattern(#-#) lcolor(black) mcolor(black)) plot2opts(lpattern(-) lcolor(gray) mcolor(gray)) scheme(s2mono)
margins, at(news_nplocalnone__=(0 1) news_nointernet__==(0 1)) vsquish pwcompare
* no change np = -* if stop internet

graph save "Figures/FE/NP_IN_Elections_money.gph", replace
*graph export "Figures/FE/NP_IN_Elections_money.pdf", replace

xtreg election_index__ news_nplocalnone__##news_nointernet__ news_notvnews__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
outreg2 using "Tables/FE/Table2_interactions.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(1.news_nplocalnone__ 1.news_nointernet__ 1.news_nplocalnone__#1.news_nointernet  news_notvnews__  b2.pid3 i.wave)
margins, at(news_nplocalnone__=(0 1) news_nointernet__==(0 1)) vsquish
marginsplot, xscale(range(-0.2 1.2)) yscale(range(0.3 0.7)) ylabel(0.3(0.1)0.7) title("Index of election attitudes") /*
	*/ ytitle("") xtitle("Newspaper") legend(title("Internet", size(medsmall) pos(6)))/*
	*/ plot1opts(lpattern(#-#) lcolor(black) mcolor(black)) plot2opts(lpattern(-) lcolor(gray) mcolor(gray)) scheme(s2mono)
margins, at(news_nplocalnone__=(0 1) news_nointernet__==(0 1)) vsquish pwcompare
* no change np = -* if stop internet

graph save "Figures/FE/NP_IN_Elections_index.gph", replace
*graph export "Figures/FE/NP_IN_Elections_index.pdf", replace




** Elections: Interactions (newspaper vs tv) **
xtreg election_faith__ news_nplocalnone__##news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
outreg2 using "Tables/FE/Table2_interactions.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(1.news_nplocalnone__ 1.news_notvnews__ 1.news_nplocalnone__#1.news_notvnews__  news_nointernet__  b2.pid3 i.wave)
margins, at(news_nplocalnone__=(0 1) news_notvnews__==(0 1)) vsquish
marginsplot, xscale(range(-0.2 1.2)) yscale(range(0.3 0.7)) ylabel(0.3(0.1)0.7) title("Faith that elections are fair") /*
	*/ ytitle("") xtitle("Newspaper") legend(title("Any TV news", size(medsmall) pos(6)))/*
	*/ plot1opts(lpattern(#-#) lcolor(black) mcolor(black)) plot2opts(lpattern(-) lcolor(gray) mcolor(gray)) scheme(s2mono)
margins, at(news_nplocalnone__=(0 1) news_notvnews__==(0 1)) vsquish pwcompare
* no change tv = -* if stop np (also if stop both)
	
graph save "Figures/FE/NP_TV_Elections_faith.gph", replace
*graph export "Figures/FE/NP_TV_Elections_faith.pdf", replace

xtreg election_attention__ news_nplocalnone__##news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
outreg2 using "Tables/FE/Table2_interactions.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(1.news_nplocalnone__ 1.news_notvnews__ 1.news_nplocalnone__#1.news_notvnews__  news_nointernet__  b2.pid3 i.wave)
margins, at(news_nplocalnone__=(0 1) news_notvnews__==(0 1)) vsquish
marginsplot, xscale(range(-0.2 1.2)) yscale(range(0.3 0.7)) ylabel(0.3(0.1)0.7) title("Elections make gov't pay attention") /*
	*/ ytitle("") xtitle("Newspaper") legend(title("Any TV news", size(medsmall) pos(6)))/*
	*/ plot1opts(lpattern(#-#) lcolor(black) mcolor(black)) plot2opts(lpattern(-) lcolor(gray) mcolor(gray)) scheme(s2mono)
margins, at(news_nplocalnone__=(0 1) news_notvnews__==(0 1)) vsquish pwcompare
* no change np = -* if stop tv news

graph save "Figures/FE/NP_TV_Elections_attention.gph", replace
*graph export "Figures/FE/NP_TV_Elections_attention.pdf", replace

xtreg election_money__ news_nplocalnone__##news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
outreg2 using "Tables/FE/Table2_interactions.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(1.news_nplocalnone__ 1.news_notvnews__ 1.news_nplocalnone__#1.news_notvnews__  news_nointernet__  b2.pid3 i.wave)
margins, at(news_nplocalnone__=(0 1) news_notvnews__==(0 1)) vsquish
marginsplot, xscale(range(-0.2 1.2)) yscale(range(0.3 0.7)) ylabel(0.3(0.1)0.7) title("Best candidate wins, not most $$") /*
	*/ ytitle("") xtitle("Newspaper") legend(title("Any TV news", size(medsmall) pos(6)))/*
	*/ plot1opts(lpattern(#-#) lcolor(black) mcolor(black)) plot2opts(lpattern(-) lcolor(gray) mcolor(gray)) scheme(s2mono)
margins, at(news_nplocalnone__=(0 1) news_notvnews__==(0 1)) vsquish pwcompare
*none

graph save "Figures/FE/NP_TV_Elections_money.gph", replace
*graph export "Figures/FE/NP_TV_Elections_money.pdf", replace

xtreg election_index__ news_nplocalnone__##news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
outreg2 using "Tables/FE/Table2_interactions.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(1.news_nplocalnone__ 1.news_notvnews__ 1.news_nplocalnone__#1.news_notvnews__  news_nointernet__  b2.pid3 i.wave)
margins, at(news_nplocalnone__=(0 1) news_notvnews__==(0 1)) vsquish
marginsplot, xscale(range(-0.2 1.2)) yscale(range(0.3 0.7)) ylabel(0.3(0.1)0.7) title("Index of elections attitudes") /*
	*/ ytitle("") xtitle("Newspaper") legend(title("Any TV news", size(medsmall) pos(6)))/*
	*/ plot1opts(lpattern(#-#) lcolor(black) mcolor(black)) plot2opts(lpattern(-) lcolor(gray) mcolor(gray)) scheme(s2mono)
margins, at(news_nplocalnone__=(0 1) news_notvnews__==(0 1)) vsquish pwcompare
* no change tv = -* if stop np (also if stop both)


graph save "Figures/FE/NP_TV_Elections_index.gph", replace
graph export "Figures/FE/NP_TV_Elections_index.pdf", replace


graph combine "Figures/FE/NP_IN_Elections_faith.gph" "Figures/FE/NP_IN_Elections_attention.gph" "Figures/FE/NP_IN_Elections_money.gph" "Figures/FE/NP_IN_Elections_index.gph", row(1) xsize(12) ysize(4) scheme(s2mono)

graph save "Figures/FE/NP_IN_Elections_combined.gph", replace
graph export "Figures/FE/NP_IN_Elections_combined.pdf", replace

graph combine "Figures/FE/NP_TV_Elections_faith.gph" "Figures/FE/NP_TV_Elections_attention.gph" "Figures/FE/NP_TV_Elections_money.gph" "Figures/FE/NP_TV_Elections_index.gph", row(1) xsize(12) ysize(4) scheme(s2mono)

graph save "Figures/FE/NP_TV_Elections_combined.gph", replace
graph export "Figures/FE/NP_TV_Elections_combined.pdf", replace




*** INCLUDE NATIONAL NEWSPAPERS ***
cd "~/ISCAP Data"

use "iscap_678_tv_long.dta", clear

replace election_faith__ = election_faith__/4
replace election_attention__ = election_attention__/2
replace election_money__ = election_money__/2

replace system_pref__ = system_pref__/4
replace system_nochange__ = system_nochange__/4
replace system_best__ = system_best__/4
replace system_nocrit__ = system_nocrit__/4

* XTSET *
xtset MNO wave
** Elections **
** No TV news **

xtreg election_faith__ news_npnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_faith
outreg2 using "Tables/FE/A6_Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_npnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)

xtreg election_attention__ news_npnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_attention
outreg2 using "Tables/FE/A6_Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_npnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)

xtreg election_money__ news_npnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_money
outreg2 using "Tables/FE/A6_Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_npnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)

xtreg election_index__ news_npnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_index
outreg2 using "Tables/FE/A6_Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_npnone__ news_notvnews__ news_nointernet__ b2.pid3 i.wave)


** Coefficient plot of results **
coefplot (elect_faith, label("Faith that elections are fair")) (elect_attention, label("Elections make gov't pay attention")) (elect_money, label("Best candidate wins, not most $$")) (elect_index, label("Index of above attitudes")), keep(news_npnone__ news_notvnews__ news_nointernet__ wave) xline(0) legend(cols(1) title("{bf:Opinions about elections in the U.S.}", size(small)) position(12) region(lcolor(white)) size(vsmall)) title("{bf:Model 1a: Any TV news}", size(medium)) scheme(s2mono) xscale(range(-0.1 0.1)) xlabel(-0.1(0.05)0.1) coeflabels(, wrap(9) ) ysize(8) xsize(5.5) graphregion(color(white))

graph save "Figures/FE/A6_Elections_medium.gph", replace


** Broadcast, cable, local **

xtreg election_faith__ news_npnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_faith
outreg2 using "Tables/FE/A6_Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_npnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)

xtreg election_attention__ news_npnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_attention
outreg2 using "Tables/FE/A6_Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_npnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)

xtreg election_money__ news_npnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_money
outreg2 using "Tables/FE/A6_Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_npnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)

xtreg election_index__ news_npnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_index
outreg2 using "Tables/FE/A6_Table1_elections_models.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_npnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ b2.pid3 i.wave)


** No national & no local **

xtreg election_faith__ news_npnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_faith
outreg2 using "Tables/FE/A6_elections_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_npnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)

xtreg election_attention__ news_npnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_attention
outreg2 using "Tables/FE/A6_elections_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_npnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)

xtreg election_money__ news_npnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_money
outreg2 using "Tables/FE/A6_elections_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_npnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)

xtreg election_index__ news_npnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave##i.state, fe vce(cluster MNO)
est store elect_index
outreg2 using "Tables/FE/A6_elections_models_1b.doc", se dec(3) alpha(0.01, 0.05) symbol(**, *) keep(news_npnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ b2.pid3 i.wave)

** Coefficient plot of results **
coefplot (elect_faith, label("Faith that elections are fair")) (elect_attention, label("Elections make gov't pay attention")) (elect_money, label("Best candidate wins, not most $$")) (elect_index, label("Index of above attitudes")), keep(news_npnone__ news_tvnotlocal__ news_tvnotnational__ news_nointernet__ wave) xline(0) legend(cols(1) title("{bf:Opinions about elections in the U.S.}", size(medsmall)) position(12) region(lcolor(white)) size(medsmall)) scheme(s2mono) xscale(range(-0.1 0.1)) xlabel(-0.1(0.05)0.1) coeflabels(, wrap(9)) ysize(8) xsize(5.5) graphregion(color(white))

graph save "Figures/FE/A6_Elections_LN.gph", replace




** Coefficient plot of results **
coefplot (elect_faith, label("Faith that elections are fair")) (elect_attention, label("Elections make gov't pay attention")) (elect_money, label("Best candidate wins, not most $$")) (elect_index, label("Index of above attitudes")), keep(news_npnone__ news_tvnotlocal__ news_tvnotbroadcast__ news_tvnotcable__ news_nointernet__ wave) xline(0) legend(cols(1) title("{bf:Opinions about elections in the U.S.}", size(medsmall)) position(12) region(lcolor(white)) size(medsmall)) title("{bf:Model 1b: Local, broadcast, cable}", size(medium)) scheme(s2mono) xscale(range(-0.1 0.1)) xlabel(-0.1(0.05)0.1) coeflabels(, wrap(9)) ysize(8) xsize(5.5) graphregion(color(white))

graph save "Figures/FE/A6_Elections_tvsplit.gph", replace

graph combine "Figures/FE/A6_Elections_medium.gph" "Figures/FE/A6_Elections_LN.gph" "Figures/FE/A6_Elections_tvsplit.gph", rows(3) xsize(3.5) ysize(9) graphregion(color(white))

graph save "Figures/FE/A6_Elections_models.gph", replace
graph export "Figures/FE/A6_Elections_models.pdf", replace


grc1leg "Figures/FE/A6_Elections_medium.gph" "Figures/FE/A6_Elections_tvsplit.gph", cols(2) graphregion(color(white)) legendfrom("Figures/FE/A6_Elections_medium.gph") position(12) ysize(12) iscale(0.6)

graph save "Figures/FE/A6_F1_Elections_models.gph", replace
graph export "Figures/FE/A6_F1_Elections_models.pdf", replace




** Calculating average change per respondent **

tabstat election_faith, by(wave)
tabstat election_attention, by(wave)
tabstat election_money, by(wave)

tabstat system_pref, by(wave)
tabstat system_nochange, by(wave)
tabstat system_best, by(wave)
tabstat system_nocrit, by(wave)






